<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>设备能耗排行</span>
    </div>
    <div class="text item">
      <el-table ref="wgzp" :data="tableData"  class="overTable">
        <el-table-column label="排名" type="index" align="center" width="50" />
        <el-table-column label="设备名称" align="center" prop="deviceName" />
        <el-table-column label="已产数量" align="center" prop="producedQuantity" />
        <el-table-column label="单位耗电量" align="center" prop="unitPowerConsumption" />
        <el-table-column label="总耗电量" align="center" prop="totalPowerConsume" />
        <el-table-column label="单位碳排放" align="center" prop="carbonEmission" :formatter="carbonEmissionFormat"/>
        <el-table-column label="总碳排放" align="center" prop="totalCarbonEmission" :formatter="totalCarbonEmissionFormat"/>
      </el-table>
    </div>
  </el-card>
</template>

<script>

// import {listDevicePowerReport, listDevicePowerReportByDay} from "@/api/dtct/dataCenter";

export default {
  name: "Equipment",
  data(){
    return{
      tableData:[
        {
            deviceName: '内饰装配线',
            producedQuantity: '130',
            unitPowerConsumption:'3000',
            totalPowerConsume:'734655',
            carbonEmission:'11',
            totalCarbonEmission: '124675'
          },
          {
            deviceName: '焊接机器',
            producedQuantity: '123',
            unitPowerConsumption:'2000',
            totalPowerConsume:'3123',
            carbonEmission:'12300',
            totalCarbonEmission: '14354657'
          },
          {
            deviceName: '压合机器',
            producedQuantity: '105',
            unitPowerConsumption:'3420',
            totalPowerConsume:'324324',
            carbonEmission:'12323',
            totalCarbonEmission: '8723455'
          },
          {
            deviceName: '涂装前处理设备',
            producedQuantity: '100',
            unitPowerConsumption:'1423',
            totalPowerConsume:'43234',
            carbonEmission:'12300',
            totalCarbonEmission: '7624537'
          },
          {
            deviceName: '电泳涂装设备',
            producedQuantity: '90',
            unitPowerConsumption:'133',
            totalPowerConsume:'12432',
            carbonEmission:'12300',
            totalCarbonEmission: '156343'
          },
          {
            deviceName: '静电喷涂设备',
            producedQuantity: '86',
            unitPowerConsumption:'3422',
            totalPowerConsume:'34234',
            carbonEmission:'12300',
            totalCarbonEmission: '523432'
          },
          {
            deviceName: '浸漆与淋漆',
            producedQuantity: '67',
            unitPowerConsumption:'2132',
            totalPowerConsume:'435345',
            carbonEmission:'288767',
            totalCarbonEmission: '6214200'
          },
          {
            deviceName: '输送设备',
            producedQuantity: '59',
            unitPowerConsumption:'132',
            totalPowerConsume:'23435',
            carbonEmission:'288767',
            totalCarbonEmission: '6201240'
          },
          {
            deviceName: '吊装设备',
            producedQuantity: '42',
            unitPowerConsumption:'3213',
            totalPowerConsume:'153241',
            carbonEmission:'288767',
            totalCarbonEmission: '6245600'
          },
          {
            deviceName: '油液加注设备',
            producedQuantity: '31',
            unitPowerConsumption:'342',
            totalPowerConsume:'4234',
            carbonEmission:'288767',
            totalCarbonEmission: '141234123'
          },
      ]
    }
  },
  mounted() {
    // this.getData()
  },
  methods:{
    // getData() {
    //   listDevicePowerReport().then(response => {
    //     this.tableData = response.rows
    //   })
    // },
    // totalCarbonEmissionFormat(row,column){
    //   return row.totalCarbonEmission.toFixed(2);
    // },
    // carbonEmissionFormat(row,column){
    //   return row.carbonEmission.toFixed(2);
    // },
  },
}
</script>

<style lang="scss">
</style>
